import { Controller, Get, Param, Query } from '@nestjs/common';

import { CateService } from '../service/cate.service';
import { Public_grocery } from 'src/utils/skip.jwt';

@Public_grocery()
@Controller('custom/cate')
export class CateController {
  constructor(private readonly cateService: CateService) {}

  @Get()
  findAll(@Query() pageDto: { pageNo: number; pageSize: number }) {
    return this.cateService.findAll(pageDto);
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.cateService.findOne(+id);
  }
}
